<!DOCTYPE html>
<!-- saved from url=(0063)https://www.17sucai.com/preview/869565/2018-09-27/xx/index.html -->
<html lang="zh">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>js炫酷消息通知插件</title>

    <!--可无视-->
    <link rel="stylesheet" type="text/css" href="./bootstrap-grid.min.css"><!--CSS RESET-->
    <link rel="stylesheet" type="text/css" href="./demo.css"><!--演示页面样式，使用时可以不引用-->

    <!--必要样式-->
    <link rel="stylesheet" href="./naranja.min.css">
</head>
<body>

<div class="container">
    <div class="row" style="padding:2em 0">
        <div class="col-md-2">
            <button class="btn btn-error" onclick="narn(&#39;log&#39;)">默认（log）</button>
        </div>
        <div class="col-md-2">
            <button class="btn btn-success" onclick="narn(&#39;success&#39;)">成功（success）</button>
        </div>
        <div class="col-md-2">
            <button class="btn btn-warning" onclick="narn(&#39;warn&#39;)">警告（warn）</button>
        </div>
        <div class="col-md-2">
            <button class="btn btn-danger" onclick="narn(&#39;error&#39;)">危险（error）</button>
        </div>
    </div>
</div>

<script type="text/javascript" src="./naranja.js"></script>
<script type="text/javascript">
    function narn(type) {
        naranja()[type]({
            title: '新消息提示',
            text: '单击“接受”以创建新通知',
            timeout: 'keep',
            buttons: [{
                text: '接受',
                click: function (e) {
                    naranja().success({
                        title: '通知',
                        text: '通知被接受'
                    })
                }
            }, {
                text: '取消',
                click: function (e) {
                    e.closeNotification()
                }
            }]
        })
    }
</script>

</body>
</html>